#{extends '/template/main.html' /}

<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">租赁信息</h3>
        <div class="panel-options">
            <a href="#" data-toggle="panel">
                <span class="collapse-icon">&ndash;</span>
                <span class="expand-icon">+</span>
            </a>
        </div>
    </div>
    <div class="panel-body">

        <form method="POST" role="form" action="/manage/merchant/ColocationCtrl/saveDetail" class="form-horizontal validate">
            <input id="idColocation" name="colocation.id" value="${colocation.id}" type="hidden">
            <input id="idPageNumber" name="pageNumber" value="${pageNumber}" type="hidden">
            <div class="form-group">
                <label class="col-sm-2 control-label" for="idCode">编号:</label>

                <div class="col-sm-10">
                    <input type="text" name="orderSource.code" class="form-control" id="idCode" placeholder="编号自动生成"
                           readonly value="${colocation?.code}">
                </div>
            </div>
            *{<div class="form-group-separator"></div>}*

            <div class="form-group">
                <label class="col-sm-2 control-label" for="idName">标题:</label>

                <div class="col-sm-10">
                    <input type="text" name="colocation.title" class="form-control" id="idTitle" placeholder="请填写平台名称"
                           data-validate="required" value="${colocation?.title}">
                </div>
            </div>
            *{<div class="form-group-separator"></div>}*

            <div class="form-group">
                <label class="col-sm-2 control-label" for="idName">金额:</label>
                <div class="col-sm-10">
                    <input type="number" name="colocation.price" class="form-control" id="idPrice" placeholder="请输入价格"
                           data-validate="required" value="${colocation?.price}">
                </div>
            </div>
            *{<div class="form-group-separator"></div>}*

            <div class="form-group">
                <label class="col-sm-2 control-label" for="idBeganAt">开始时间</label>
                <div class="col-sm-10">
                    <input name="colocation.beganAt" type="text" class="form-control datepicker"  data-format="yyyy-mm-dd" id="idBeganAt" placeholder=""
                           data-validate="required" value="${colocation?.beganAt}">
                </div>
            </div>
            *{<div class="form-group-separator"></div>}*

            <div class="form-group">
                <label class="col-sm-2 control-label" for="idEndAt">结束时间</label>
                <div class="col-sm-10">
                    <input name="colocation.endAt" type="text" class="form-control datepicker" data-format="yyyy-mm-dd" id="idEndAt" placeholder=""
                           data-validate="required" value="${colocation?.endAt}">
                </div>
            </div>
            *{<div class="form-group-separator"></div>}*

            <div class="form-group">
                <label class="col-sm-2 control-label" for="idremark">备注:</label>

                <div class="col-sm-10">
                    <textarea class="form-control" cols="5" id="idremark" name="colocation.remark" placeholder="请输入备注">${colocation?.remark}</textarea>
                </div>
            </div>


            <div class="form-group-separator"></div>

            <div class="form-group">
                <label class="col-sm-2 control-label" for="field-5"></label>

                <div class="col-sm-10">
                    <button type="submit" class="btn btn-success">&nbsp;&nbsp;保存&nbsp;&nbsp;</button>
                    <button id="idReset" type="reset" class="btn btn-white">&nbsp;&nbsp;重置&nbsp;&nbsp;</button>
                </div>

            </div>

        </form>

    </div>
</div>

*{<script src="/public/js/timepicker/bootstrap-timepicker.min.js"></script>}*

<script>
    var id = '${id}';
    $(function () {
        // 提示
        var msg = '${flash.get("msg")}';
        if(msg) {
            saveSuccess(msg);
        }

        //修改页面,隐藏充值按钮
        if(id > 0){
            $('#idReset').hide();
        }
    })


</script>